<template>
  <div class="main">
    <mp-searchbar :isFocus=true :inputValue="inputValue" :placeholder="placeholder"
       @input="input" @blur="blur" @focus="focus" @confirm="confirm" v-model.lazy="value"></mp-searchbar>
    <p>222</p>
    111
    <i-button type="primary" @click="handleclick()">这是一个按钮</i-button>
  </div>
</template>

<script>
import card from '@/components/card'
import 'mpvue-weui/src/style/weui.css';
import mpSearchbar from 'mpvue-weui/src/searchbar'
export default {
  data () {
    return {
      motto: 'Hello miniprograme',
      userInfo: {
        nickName: 'mpvue',
        avatarUrl: 'http://mpvue.com/assets/logo.png'
      }
    }
  },

  components: {
    card,
    mpSearchbar
  },

  methods: {
    handleclick(){
      console.log(111)
    },
    bindViewTap () {
      const url = '../logs/main'
      if (mpvuePlatform === 'wx') {
        mpvue.switchTab({ url })
      } else {
        mpvue.navigateTo({ url })
      }
    },
    clickHandle (ev) {
      console.log('clickHandle:', ev)
      // throw {message: 'custom test'}
    }
  },

  created () {
    // let app = getApp()
  }
}
</script>

<style lang="scss" scoped>
  .main{
    font-size: 20px;
    p{
      font-size: 30px;
    }
  }
</style>
